<?php

namespace App\Http\Controllers\Agent\Index;

use Illuminate\Http\Request;
use Session,Config;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class IndexController extends Controller
{
    //
    public function index()
    {
        return view('Agent.Index.index');
    }

    /**
     *代理汇总
     */
    public function sumary()
    {
        return view('Agent.Sumary.index');
    }

    /**
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     * 代理级别   1--3
     */
    public function agent()
    {
        return view('Agent.Level.index');
    }

    /**
     * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
     * 其他关联用户数
     */
    public function other()
    {
        return view('Agent.Level.other');
    }


    public function logout()
    {
        Session::forget(Config::get('custom.setting.MEMBER_TOKEN'));
        Session::forget(Config::get('custom.setting.MEMBER_CITY'));
        Session::forget(Config::get('custom.setting.MEMBER_REGION'));
        Session::forget(Config::get('custom.setting.MEMBER_UTYPE'));
        Session::forget(Config::get('custom.setting.MEMBER_INFO'));
        Session::forget(Config::get('custom.setting.MEMBER_CODE'));
        return redirect('/');
    }

    

}
